home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / mc-3.2 / mc-3 / mc-3.2.1 / nt / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-17  |  4.2 KB  |  135 lines

  1. /****************************************************************************
  2.  CONFIG.HPP -   Midnight Commander Configuration for Windows NT OS
  3.  
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2 of the License, or
  8.    (at your option) any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
  18.  
  19.  ----------------------------------------------------------------------------
  20.  Changes:
  21.         - Created 951204/jfg
  22.  
  23.  ----------------------------------------------------------------------------
  24.  Contents:
  25.         - Headers flags
  26.         - Library flags
  27.         - Typedefs
  28.         - etc.
  29.  ****************************************************************************/
  30. #ifndef __CONFIG_HPP                    //Prevent multiple includes
  31. #define __CONFIG_HPP
  32.  
  33.  
  34. #include <../VERSION>
  35.  
  36. // ---------------------------------------------------------------------------
  37. // Headers
  38. #define STDC_HEADERS
  39. #define HAVE_STRING_H
  40. #define HAVE_DIRENT_H
  41. #define HAVE_LIMITS_H
  42.  
  43. #define NO_UNISTD_H
  44.  
  45. // ---------------------------------------------------------------------------
  46. // "Standard" Library
  47. #define HAS_MEMSET
  48. #define HAS_MEMCHR
  49. #define HAS_MEMCPY
  50. #define HAS_MEMCMP
  51. #define HAVE_STRDUP
  52. #define HAVE_STRERROR
  53.  
  54. #define REGEX_MALLOC
  55.  
  56. #define NO_TERM
  57. #define NO_INFOMOUNT
  58.  
  59. // ---------------------------------------------------------------------------
  60. // Windowing library
  61. #if !defined(HAVE_SLANG) && !defined (USE_NCURSES)
  62. #define HAVE_SLANG
  63. #endif
  64.  
  65. #ifdef USE_NCURSES
  66. #define RENAMED_NCURSES
  67. #endif
  68.  
  69. // ---------------------------------------------------------------------------
  70. // Typedefs (some useless under NT)
  71. typedef int gid_t;                 // Not defined in <sys/types.h>
  72. typedef int uid_t;
  73. typedef int mode_t;
  74. typedef int pid_t;
  75. typedef unsigned int umode_t;
  76. typedef unsigned int nlink_t;
  77.  
  78. #define INLINE
  79. #define inline
  80.  
  81. // ---------------------------------------------------------------------------
  82. // File attributes
  83. #define S_ISLNK(x) 0
  84.  
  85. #ifdef _MSC_VER                                                 // Already defined in Watcom C headers
  86. #define S_ISBLK( m )    0               /* Some of these are not actual values*/
  87. #define S_IFBLK         0010000                         /* but don't worry, these are yet not possible on NT */
  88. #define S_IFLNK         0010000
  89.  
  90. #define S_IRWXU         0000700
  91. #define S_IRUSR         0000400
  92. #define S_IWUSR         0000200
  93. #define S_IXUSR         0000100
  94.  
  95. #define S_IRWXG         0000070
  96. #define S_IRGRP         0000040
  97. #define S_IWGRP         0000020
  98. #define S_IXGRP         0000010
  99.  
  100. #define S_IRWXO         0000007
  101. #define S_IROTH         0000004
  102. #define S_IWOTH         0000002
  103. #define S_IXOTH         0000001
  104.  
  105. #define S_ISUID         0004000
  106. #define S_ISGID         0002000
  107. #define S_ISVTX         0001000
  108.  
  109. #define S_IFIFO         _S_IFIFO         /* pipe */
  110.  
  111. #define S_ISCHR( m )    (((m) & S_IFMT) == S_IFCHR)
  112. #define S_ISDIR( m )    (((m) & S_IFMT) == S_IFDIR)
  113. #define S_ISREG( m )    (((m) & S_IFMT) == S_IFREG)
  114. #define S_ISFIFO( m )   (((m) & S_IFMT) == S_IFIFO)
  115.  
  116. /* Symbolic constants for the access() function */
  117. #define R_OK    4       /*  Test for read permission    */
  118. #define W_OK    2       /*  Test for write permission   */
  119. #define X_OK    1       /*  Test for execute permission */
  120. #define F_OK    0       /*  Test for existence of file  */
  121. #endif  //_MSC_VER
  122.  
  123.  
  124. // ---------------------------------------------------------------------------
  125. // Inline definitions
  126.  
  127. // Pipes
  128. #define popen   _popen
  129. #define pclose  _pclose
  130. #define pipe(p)  _pipe(p, 4096, 0x8000 /*_O_BINARY*/)
  131.  
  132. #define sleep   Sleep                                                                   // Use Win32 name
  133.  
  134. #endif //__CONFIG_HPP
  135.